/**
 * 
 */
package org.cuatrovientos.arreglo;

import java.util.Scanner;

/**
 * @author david_berrade
 *
 */
public class Arreglo {

private int[] numbers;

	/**
	 * constructor
	 */

public Arreglo(){
	numbers= new  int[10];
}
	
/**
 * Initializate the array
 * 
 */

public void init(){
	Scanner reader= new Scanner(System.in);
	String line="";
	
	for( int i=0;i<numbers.length;i++){
		
		System.out.println("Give me a number: ");
		line=reader.nextLine();
		numbers[i]= Integer.parseInt(line);
		
		
	}
	
	
}



/**
 * increment in 1
 */
public void increment(){
	
	for (int i=0; i<numbers.length;i++){
		
		numbers[i]=numbers[i]+1;
		
	}
	
/**
 * decrement in 1	
 */
}
public void decrement(){

	for (int i=0; i< numbers.length;i++){
		
		numbers[i]= numbers[i]-1;
		
	}


}

/**
 * show even(pares) elements in the array
 */

public void pairs(){
	int counter=0;
	for (int i=0; i<numbers.length;i++){
		
		if (numbers[i]%2 ==0){
			counter++;
		}
	}
	
	System.out.println(" Total even:"+counter);
}






/**
 * 
 * @param main prrogram
 */
	
	public static void main(String[] args) {
		// TODO Auto-generated method stub

	
	}

}
